import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.BorderLayout;
import javax.swing.JTextField;
import java.awt.Font;
import javax.swing.JPasswordField;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Color;
import java.sql.*;
import javax.swing.*;

import com.sun.jndi.ldap.Connection;


@SuppressWarnings("unused")
public class EmployeeLoginForm<prepareStatement> {

	private JFrame frame;
	private JTextField textField;
	private JPasswordField passwordField;

// Sample change in code by viren

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					EmployeeLoginForm window = new EmployeeLoginForm();
					window.frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}
java.sql.Connection con=null;

	/**
	 * Create the application.
	 */
	public EmployeeLoginForm() {
		initialize();
		con=Dbsqlconnection.dbConnector();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frame = new JFrame();
		frame.getContentPane().setBackground(Color.LIGHT_GRAY);
		frame.setBounds(100, 100, 450, 300);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.getContentPane().setLayout(null);
		
		JLabel lblUsername = new JLabel("UserName :");
		lblUsername.setFont(new Font("Sylfaen", Font.BOLD, 13));
		lblUsername.setBounds(191, 47, 76, 14);
		frame.getContentPane().add(lblUsername);
		
		textField = new JTextField();
		textField.setBounds(266, 43, 86, 20);
		frame.getContentPane().add(textField);
		textField.setColumns(10);
		
		JLabel lblPassword = new JLabel("Password :");
		lblPassword.setFont(new Font("Tahoma", Font.BOLD, 13));
		lblPassword.setBounds(191, 87, 76, 14);
		frame.getContentPane().add(lblPassword);
		
		passwordField = new JPasswordField();
		passwordField.setEchoChar('*');
		passwordField.setBounds(266, 85, 86, 20);
		frame.getContentPane().add(passwordField);
		
		JButton btnLogin = new JButton("Login");
		btnLogin.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				try{
						String query="select * from EmployeeDetails where username=? & password=?";
						
						
					}catch(Exception e1){
						
					
				}
				
			}
		});
		btnLogin.setBounds(263, 140, 89, 23);
		frame.getContentPane().add(btnLogin);
	}
}
